﻿@using A2.ERP.Models
@{
    List<v_StoreHouse> v_StoreHouseList = ViewBag.v_stroeHouse;
    List<t_StoreHouse> storeHouseList = ViewBag.stroeHouse;
}
<section id="DetopManager">
    <div class="card">
        <div class="card-header">添加群组
            <i class="btn-fold icon SkyUI icon-down float-right"></i>
        </div>
        <div class="card-body">
            @using (Html.BeginForm("DetopManager", "Setting", FormMethod.Post, new
            {
                @class = "form"
            }))
            {
                <div class="form-group">
                    <label>库房</label>
                    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <label class="input-group-text" for="stroeHouse">库房</label>
                        </div>
                        <select class="custom-select" id="stroeHouse">
                            <option selected>Choose...</option>
                            @foreach (var item in storeHouseList)
                            {
                                <option value="@item.HouseID">@item.HouseName</option>
                            }
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label>库区名称</label>
                    <input type="text" name="SubName" value="" class="form-control"/>
                </div>
                <div class="form-group">
                    <label>状态</label>
                    <div>
                        <input type="radio" name="state" value="" />
                        启用
                        <input type="radio" name="state" value="" />
                        禁用
                    </div>
                </div>                
                <div class="form-group">
                    <label>备注</label>
                    <input type="text" name="Description" value="" class="form-control" />
                </div>
                <div class="form-group">
                    <button class="btn btn-primary">添加</button>
                </div>
            }
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>库房</th>
                <th>库区</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var storeHouse in v_StoreHouseList)
            {
                <tr>
                    <td>@storeHouse.HouseName</td>
                    <td>@storeHouse.SubareaName</td>
                    <td>
                       @Html.Raw(storeHouse.State == "Y"
                       ? @"<i class='icon SkyUI icon-check-circle text-success'></i>"
                        : @"<i class='icon SkyUI icon-close-circle text-danger'></i>")
                    </td>
                    <td>
                        <button class="btn btn-sm btn-success">
                            <i class="icon SkyUI icon-plus"></i>
                            添加
                        </button>
                        <button class="btn btn-sm btn-primary">
                            <i class="icon SkyUI icon-search"></i>
                            编辑
                        </button>
                        <button class="btn btn-sm btn-danger">
                            <i class="icon SkyUI icon-close"></i>
                            删除
                        </button>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</section>

<script>
    ;
    !function () {

    }();
</script>